home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 088 / waka100.arc / README.COM (.txt) < prev    next >
Encoding:
Graham's TXT2COM  |  1987-07-04  |  8.1 KB  |  119 lines

  1.  
  2.                                  ~40WATCHKAT~07
  3.                           ~27Carrier Detect Monitor~07
  4.                              by Keith P. Graham
  5.                                 July 4, 1987
  6.  
  7.                  WATCHKAT is a program loader and monitor which can be 
  8.         used in a communications environment to detect loss of carrier 
  9.         and kill the currently running job. This is useful for Bulletin 
  10.         Board "Doors" and similar applications. It is similar in concept 
  11.         to the WATCHDOG programs which monitor carrier detect and reboot 
  12.         the system. WATCHKAT kills only the currently running program 
  13.         and does not cause the system to reboot.
  14.  
  15.                  WATCHKAT is a loader program which will load and 
  16.         execute a .COM or .EXE file. It will not execute .BAT files and 
  17.         should not be used to execute a second COMMAND.COM. It is small, 
  18.         adding very little in the way of memory usage and is resident 
  19.         only while the application is running. WATCHKAT unloads itself 
  20.         from memory when it is completed. WATCHKAT restores all used 
  21.         memory and all interrupt vectors to their original values after 
  22.         killing a program and sets ERRORLEVEL return codes according to 
  23.         what action WATCHKAT had to take.
  24.  
  25.                  WATCHKAT uses COM1, but instructions are included to 
  26.         modify the program for COM2 or COM3.
  27.  
  28.                  WATCHKAT is invoked by the command:
  29.  
  30.         WAKA program.ext parm1 parm2 parm3 parm4 ... parmn
  31.  
  32.         WAKA.COM must be on the path or the current subdirectory. 
  33.         PROGRAM.EXT is the complete disk/path/filename and extension of 
  34.         the program to be executed. WATCHKAT is not like command.com, 
  35.         but must have, at the very least, the filename and the extension 
  36.         of the program to be executed. WATCHKAT does not search a path. 
  37.         It needs full file name. PARM1 - PARMn are the normal parameters 
  38.         that would be passed to the program you want WATCHKAT to 
  39.         execute. There is a feature to the program which makes BASIC a 
  40.         little touchy about parameters. Please follow the last parameter 
  41.         with a space so that BASIC can properly use the parameters. This 
  42.         appears to be unique to BASIC. It should be noted that BASIC is 
  43.         nasty about opening and closing COM ports so that normal 
  44.         precautions still apply about using BASIC for communications 
  45.         applications.
  46.  
  47.                  When WATCHKAT begins it attempts to load the program 
  48.         specified on the command line. WATCHKAT takes over interrupt 8 
  49.         and checks CD on COM1 every 10 seconds. If carrier drops, it 
  50.         stops the currently executing program and issues the dos 
  51.         function 4Ch to kill the program. Control should then return to 
  52.         WATCHKAT which will reset all it can and exit back to DOS. 
  53.         (Actually WATCHKAT is doing much more, but this is the part that 
  54.         matters). Interrupt 4Ch cannot kill command.com so WATCHKAT will 
  55.         not receive control. If after 20 seconds CD is still down and 
  56.         WATCHKAT is still working, WATCHKAT gives up. It restores as 
  57.         much as it can and returns control to DOS. If WATCHKAT has been 
  58.         used to start up a second command processor, it is up to the 
  59.         command processor to get itself out of trouble at this point. I 
  60.         do not recommend using WATCHKAT to invoke a second command 
  61.         processor as it is possible to hang the system if CD drops.
  62.  
  63.                  WATCHKAT returns error levels according to the results 
  64.         of executing a program. These are summarized here.
  65.  
  66.                  ERRORLEVEL          Meaning
  67.  
  68.                    0                 Normal execution and return
  69.                    8                 Program not found, WATCHKAT failed
  70.                                      on attempt to execute program.
  71.                    9                 Badly formed parameter line.
  72.                   10                 Program killed due to CD drop.
  73.  
  74.         In addition WATCHKAT will pass on any ERRORLEVELs set by the 
  75.         sub-process. If WATCHKAT is used to execute ARCVUE and ARCVUE 
  76.         returns error 10 then that will be expressed in the return 
  77.         ERRORLEVEL. This may create possible conflicts when it cannot be 
  78.         certain if an ERRORLEVEL is from WATCHKAT or the sub-process.
  79.  
  80.         WATCHKAT will return error levels as follows for termination 
  81.         types. If a job ends due to non-normal exit methods then 
  82.         WATCHKAT will return an ERRORLEVEL as follows:
  83.  
  84.                  ERRORLEVEL          Meaning
  85.  
  86.                    1                 Ctrl-Break exit.
  87.                    2                 Critical DOS Error Exit.
  88.                    3                 Terminate and stay resident.
  89.  
  90.                  WATCHKAT only monitors COM1. If you have a need to 
  91.         monitor another port then the program WAKA.COM can be modified 
  92.         using debug. The location of the COM port is at 104h in the .COM 
  93.         file. 0 is com1, 1 is com2, 2 is com3. I am not giving a 
  94.         detailed script on how to do this, because if you don't know how 
  95.         you shouldn't be doing it. Please do not distribute versions of 
  96.         WATCHKAT with the COM2 modification as I think that it would 
  97.         cause too much confusion.
  98.  
  99.                  I am collecting ideas for improvements to the program. 
  100.         In a future version I will have either an install program or a 
  101.         command line switch to control com port. I would like to create 
  102.         a similar program which would also monitor time remaining for 
  103.         PC-Board and kill programs after time is up. Please let me know 
  104.         if you have any ideas.
  105.  
  106.                  WATCHKAT is a free program. Please distribute it as 
  107.         WAKA100.ARC with all of the files included without modification. 
  108.         I have been testing WATCHKAT at PC Rockland for over a month and 
  109.         have not had any problems. It has been monitoring a PC Board 
  110.         Door called ARCVUE. If you have any problems or suggestions 
  111.         leave a message to me (Keith Graham) at PC-Rockland at (914) 
  112.         353-2176.
  113.            
  114.                    Thanks,
  115.  
  116.                    Keith
  117.  
  118.  
  119.